<?php

/**
 * OperadoresIngreso form.
 *
 * @package    cronos-doctrine
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class OperadoresIngresoForm extends BaseOperadoresIngresoForm
{
  public function configure()
  {
      
      
      //Eliminar los campos del formularios  created_at y updated_at
      unset (
        $this['created_at'],
        $this['updated_at']

      );
      
      $this->widgetSchema['concepto_cf_id'] = new sfWidgetFormInputHidden();
      $this->widgetSchema['servicio_tipo_id'] = new sfWidgetFormInputHidden();
      $this->widgetSchema['camioneta_id'] = new sfWidgetFormInputHidden();
      $this->widgetSchema['cliente_id'] = new sfWidgetFormInputHidden();
      $this->widgetSchema['agendado_id'] = new sfWidgetFormInputHidden();
      $this->widgetSchema['empresa_id'] = new sfWidgetFormInputHidden(array(),array('value'=> sfContext::getInstance()->getUser()->getAttribute('agente_user_empresa_id')));
      $this->widgetSchema['cantidad'] = new sfWidgetFormInputHidden(array(),array('value'=> 1));
      $this->widgetSchema['fecha'] = new sfWidgetFormInputHidden(array(),array('value'=> date('Y-m-d h:i:s')));
      $this->widgetSchema['operador_id'] = new sfWidgetFormInputHidden(array(),array('value'=> sfContext::getInstance()->getUser()->getAttribute('agente_user')));
      $this->widgetSchema['descripcion'] = new sfWidgetFormInputHidden();
      
      $this->widgetSchema['numero_cheque'] = new sfWidgetFormInput(array(),array('class' => 'text', 'placeholder' => 'Cheque numero'));
      
      
      $this->widgetSchema['pago_id'] = new sfWidgetFormDoctrineChoice(array(
                        'model'     => 'Pago',
                        'add_empty' => 'Tipo pago',
        ));
      
     
      $this->widgetSchema['banco_id'] = new sfWidgetFormChoice(array(
         'choices' => OperadoresIngreso::$banco,
         'expanded' => false,
         'multiple' => false

      ));
      
      $this->widgetSchema->setLabel('pago_id', 'Tipo de pago');
      
      $this->validatorSchema['agendado_id'] = new sfValidatorPass();
      
      
      
      
  }
}
